\section{Miscellaneous Notation}

In this last video on mathematical notation, we're going to pick up some random bits that just didn't fit well into the other videos.

\begin{center}
  \fbox{\includegraphics[width=0.75\linewidth]{img-6-1}}
\end{center}

We'll start with a simple symbol that we probably could have introduced somewhere earlier: the square root symbol. Using \verb|\sqrt{}| will create a square root symbol over everything inside the brackets. The radical will resize itself automatically, so you don't need to worry about that at all. This also takes an optional argument to create an $n$th root, which you put in square brackets before the curly brackets.

\begin{center}
  \fbox{\includegraphics[width=0.75\linewidth]{img-6-2}}
\end{center}

The most obvious mathematical equation to write down with this is the quadratic formula. Notice that we used \verb|\pm| for the plus or minus symbol.

There are a few things to pay attention to here. Remember that \LaTeX{} does not start a new paragraph unless there is a blank space. We put the full equation on its own line because it makes it easier to read instead of trying to follow wrapped text. Remember that your code should be as readable as possible.

Also, notice that all the brackets are matched up, from the ones that create math mode, to the ones that are part of the fraction command, to the ones that are part of the square root command. This is absolutely critical. Every bracket you open must be closed, otherwise your document will probably not compile and probably not look the way you wanted it to if it did.

One last piece of notation related to this. If you wanted to have a minus or plus symbol instead of a plus or minus symbol, you would use \verb|\mp|.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-6-3}}
\end{center}

Next, we'll move on to some set theory. The set brackets by themselves are interpreted as grouping symbols by \LaTeX, so to indicate that you actually mean these symbols, you have to use backslashes in front of them. In set-builder notation, the such that symbol can either be a colon or \verb|\mid|. Avoid using the pipe symbol here because it doesn't handle the spacing properly.

We will also need symbols to indicate relationships and operations between sets. We'll start with the basic set relationships of subset and superset. Some people use the symbols with and without the line underneath it as meaning different things, but I them as the same. To indicate a proper subset or proper superset relationship, I use these symbols.

To indicate unions and intersections, use \verb|\cup| and \verb|\cap|. If you wanted to use shorthand notation for unions and intersections for indexed sets, use \verb|\bigcup| and \verb|\bigcap|. The superscripts and subscripts will behave like summation notation for these. There's a special symbol for the set difference if you choose not to use a subtraction symbol. And there are a couple varieties of the empty set symbol. This will cover most of the symbols that you'll need for basic set theory.

\begin{center}
  \fbox{\includegraphics[width=0.9\linewidth]{img-6-4}}
\end{center}

This next set of symbols comes from logic. Here are the symbols for and, or, and not. We also have both directions for the implication symbol and the biconditional symbol. Finally, we have the universal and existential quantifiers and the therefore symbol. This will take care of the majority of the symbols you'll need. If you're taking a course in formal logic, there may be a few more, but you'll have to look those up when you get there.

\begin{center}
  \fbox{\includegraphics[width=0.9\linewidth]{img-6-5}}
\end{center}

There are two different types of ellipses that can be used in \LaTeX: \verb|\cdots| and \verb|\ldots|. The \verb|\cdots| command creates dots that are halfway up the line, and the \verb|\ldots| command makes dots at the bottom of the line. Although these dots look similar, they are used in different situations. The \verb|\cdots| are used in places where arithmetic or other math symbols are being used, such as a sum. The \verb|\ldots| are used when the structure is more English than math, such as between the commas in a long list. Here is an example that mixes the two types of dots. You can see the different heights side by side, and hopefully you can see why each one was chosen.

\begin{center}
  \fbox{\includegraphics[width=0.45\linewidth]{img-6-6}}
\end{center}

For ordering symbols on the real numbers, equal to, greater than, and less than are just the standard symbols on the keyboard. For greater than or equal to and less than or equal to, we have these symbols. And all of these commands have negations. There's also a command for approximately equal to, and the single-squiggle version of that.

\begin{center}
  \fbox{\includegraphics[width=0.65\linewidth]{img-6-7}}
\end{center}

These last two symbols don't have a special negation symbol. In fact, most symbols don't have negations. However, there is a way to create negations. The native \LaTeX{} command is to type \verb|\not| in front of the symbol. This works sometimes, but other times it misses the mark by quite a bit. To correct this, you can use the \href{https://ctan.org/pkg/centernot}{\texttt{centernot}} package and the \verb|\centernot| command. This package calculates the horizontal size of the object that you are negating and then draws the slash accordingly. This will work for negating most most single character symbols.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-6-8}}
\end{center}

For a course in number theory, you will run into modular arithmetic. Students often use an equal sign for this, but you really should use the congruence symbol, which is a three bar equal sign. The mod $m$ part can be created with and without parentheses. You'll notice here that these commands insert a little extra space to make sure the mod part doesn't bleed into the rest of it. We also have a symbol for the product notation analogous to summation notation. Lastly, in certain classes you will run into a strange-looking calligraphic font known as Fraktur. Regardless of why this font is used, you can create it using the \verb|\mathfrak{}| command. These are symbols that you'll recognize when you see them, and if you never see them you won't have anything to worry about.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-6-9}}
\end{center}

If you take a class in combinatorics, you will need to typeset binomial coefficients. There are two different approaches. I'm showing you the old method because you will see it quite commonly, but you should get in the habit of using the new method. The reason is that the new method fits more consistently how we code in \LaTeX. The \verb|\choose| command operates like a strangely written function, where arguments are on both sides of it, but \verb|\binom{}{}| is a function that looks like all of our other typesetting functions, like \verb|\frac{}{}|. A nice feature of this notation is that it extends easily to multinomial coefficients by just changing what we put inside the second set of brackets.

There is a wide variety of notations for combinations and permutations that people use. Most of them are straightforward to typeset, but there's one that takes a little bit of extra effort. The pre-subscripting is not a command that naturally exists in \LaTeX. The quick and easy way to deal with this is to create an empty symbol with a subscript as the symbol that comes before the $C$ or $P$, and the letter itself will have its own subscript. This can also be made to work with pre-superscripts. If you're just using it for something simple like this, you can get away with it. The \href{https://ctan.org/pkg/tensor?lang=en}{\texttt{tensor}} package has a way of doing pre-scripts, but it's really designed for much more complicated notation. I think it ends up being overkill for this situation.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-6-10}}
\end{center}

Abstract algebra has a lot of notation, but it turns out that you've seen most of it already. For example, the two-line notation for permutations is just a \text{pmatrix}. Some people may try to cram all the code into a single row, but I'm a proponent of using spacing to make the code easier to read. There are also a lot of special functions, like the signum, kernel, and cokernel, but these either already exist or you can create these using the \verb|\operatorname{}| command. Perhaps the only important new symbol is the normal subgroup symbol. There are several versions of this, and you can just pick the one that you like the best.

\begin{center}
  \fbox{\includegraphics[width=0.65\linewidth]{img-6-11}}
\end{center}

There is a math calligraphy font that can be used for script letters. It only has capital letters for this particular font. You may also be interested in \verb|\ell| as a cursive letter l that looks less like a number 1. And we've already seen the Fraktur font in number theory, but here's the whole alphabet with both capital and lower case letters.

\begin{center}
  \fbox{\includegraphics[width=0.95\linewidth]{img-6-12}}
\end{center}

And if this wasn't enough, there are two more commands that can be used for stacking multiple symbols together: \verb|\overset{}{}| and \verb|\underset{}{}|. The first brackets are for the symbol that will be put either above or below the symbol in the second brackets. If you wanted to get really fancy, you can use both of these at the same time.

At this point, you have seen a fairly substantial number of commands. But this is really only scratching the surface. Undoubtedly, there will be some special symbol that comes up in some specific context that you will want to use. Sometimes you can find them on the internet by searching for \LaTeX{} plus a word associated with that symbol or maybe the subject area. But there are a couple other resources that you should be aware of.

One place to visit is the \href{http://detexify.kirelabs.org/classify.html}{Detexify website}. It allows you to draw symbols and it will try to find the one that matches what you've drawn. It will not only show you the symbols from its guesses, but it will also show you the package that the symbols can be found in.

If that's not working for you, you can also look through the \href{http://mirrors.rit.edu/CTAN/info/symbols/comprehensive/symbols-a4.pdf}{Comprehensive \LaTeX{} Symbol List}, which has over 300 pages of symbols. There are many versions of this dating back to the early 2000s. The link I've provided is dated January 2017, so it should be fairly up to date. The file itself is a bit overwhelming, but by searching for key terms you might find what you're looking for.

This concludes the sub-series on mathematical notation in \LaTeX. If you were able to follow along with the last several videos, you will be well-prepared for most of your mathematical typesetting for the majority of situations you find yourself in.

The next video will shift gears a bit and talk about how to do some basic customizations to your \LaTeX{} documents.